package com.wwb.w0512;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

public class ContentFragment extends Fragment {
    private View view;
    private TextView mContent;

    @Override
    public void onAttach(@NonNull Activity activity) {
        super.onAttach(activity);
    }


    @Nullable
    @Override
    public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {


        view=inflater.inflate(R.layout.fragment_content,container,false);
       if (view!=null){
           initView();

       }
       setText(((MainActivity)getActivity()).getSettingText()[0]);
        return view;



    }

    private void initView() {
        mContent=(TextView) view.findViewById(R.id.content);

    }
    public void setText(String text){
        
        mContent.setText(text);
    }
}
